/**
* 输入提现密码
*/
import React, { Component } from 'react';
import { View, Text, StyleSheet, Platform, Image, TouchableOpacity, ScrollView, TouchableWithoutFeedback, NativeModules, Animated } from "react-native";
import { Colors, ImageRes, Dimens, Tools } from '../../utils/Assets.js';
import { Actions } from "react-native-router-flux";
import { VerifyCode } from '../custom/index.js'

class WithdrawPasswordView extends React.Component {
    constructor(props) {
        super(props);
        this.state = {

        }
    }

    componentDidMount() {

    }

    componentWillUnmount() {
    }
    onChangeVerifyCode(text) {
        if (text.length == 6) {
            Actions.pop()
            if (this.props.callBack) {
                this.props.callBack(text)
            }
        }
    }
    render() {
        return (
            <View style={styles.container}>
                <View style={{ backgroundColor: "#ffffff", marginHorizontal: 30, borderRadius: 10, height: 300, marginTop: 200 }}>
                    <ScrollView style={{ flex: 1 }}>
                        <View style={{ flexDirection: 'row', marginTop: 15 }}>
                            <TouchableOpacity activeOpacity={0.8} onPress={() => {
                                Actions.pop()
                            }} style={{ flex: 1 }}>
                                <Image source={ImageRes.profit_delete} style={{ width: 35, height: 35, marginLeft: 15 }}></Image>
                            </TouchableOpacity>
                            <View style={{ flex: 1, justifyContent: 'center' }}>
                                <Text style={{ fontSize: 16, color: "#333333", alignSelf: 'center' }}>请输入提现密码</Text>
                            </View>
                            <View style={{ flex: 1 }}></View>
                        </View>
                        <View style={{ flex: 1, justifyContent: 'center', paddingVertical: 40 }}>
                            <Text style={{ fontSize: 16, color: "#333333", alignSelf: 'center' }}>提现</Text>
                            <Text style={{ fontSize: 30, color: "#333333", alignSelf: 'center', fontWeight: 'bold', marginTop: 15 }}>￥1000</Text>
                        </View>
                        <View style={{ backgroundColor: Colors.bg_color, height: 1 }}></View>
                        <View style={{ paddingVertical: 15 }}>
                            <VerifyCode verifyCodeLength={6} onChangeText={text => this.onChangeVerifyCode(text)} style={{}}></VerifyCode>
                        </View>
                    </ScrollView>
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        position: "absolute",
        top: 0,
        bottom: 0,
        left: 0,
        right: 0,
        backgroundColor: 'rgba(52,52,52,0.3)'
    },
});
module.exports.WithdrawPasswordView = WithdrawPasswordView;
